/*    */ package eos.moe.dragoncore;
/*    */ 
/*    */ import java.util.Arrays;
/*    */ import java.util.Collection;
/*    */ import java.util.LinkedList;
/*    */ import java.util.List;
/*    */ import java.util.function.Function;
/*    */ import java.util.stream.Collectors;
/*    */ import net.minecraft.item.ItemStack;
/*    */ import net.minecraft.nbt.NBTBase;
/*    */ import net.minecraft.nbt.NBTTagCompound;
/*    */ import net.minecraft.nbt.NBTTagString;
/*    */ 
/*    */ 
/*    */ 
/*    */ public class kd
/*    */   extends nh
/*    */ {
/*    */   private ItemStack g;
/*    */   
/*    */   public kd(ItemStack itemStack) {
/* 22 */     this.g = itemStack;
/*    */   }
/*    */   
/*    */   public o v(String str) {
/* 26 */     return v(str, uv.q);
/*    */   }
/*    */   
/*    */   public o v(String str, uv uv1) {
/* 30 */     LinkedList<String> linkedList = new LinkedList(Arrays.asList((Object[])str.split("\\.")));
/* 31 */     String str1 = linkedList.poll();
/* 32 */     String str2 = linkedList.poll();
/*    */     
/* 34 */     if (str2 != null) {
/* 35 */       List<String> list2; List<String> list1; int i; NBTTagCompound nBTTagCompound; switch (str2) {
/*    */         case "物品名":
/*    */         case "name":
/* 38 */           return ah.v(this.g.func_82833_r());
/*    */         case "lore":
/* 40 */           list2 = ve.z(this.g);
/* 41 */           i = (int)v(linkedList.poll());
/* 42 */           if (list2.size() > i)
/* 43 */             return ah.v(list2.get(i)); 
/* 44 */           return ah.q;
/*    */         case "lores":
/* 46 */           list1 = ve.z(this.g);
/* 47 */           return new nf((Collection<o>)list1.stream().map(ah::new).collect(Collectors.toList()));
/*    */         case "数量":
/*    */         case "count":
/* 50 */           return xk.v(Integer.valueOf(this.g.func_190916_E()));
/*    */         case "nbt":
/* 52 */           nBTTagCompound = this.g.func_77978_p();
/* 53 */           if (nBTTagCompound != null) {
/* 54 */             String[] arrayOfString = uv1.v(0, "").split("\\.");
/* 55 */             for (int j = 0; j < arrayOfString.length - 1; j++) {
/* 56 */               nBTTagCompound = nBTTagCompound.func_74775_l(arrayOfString[j]);
/*    */             }
/* 58 */             if (arrayOfString.length > 0) {
/* 59 */               NBTBase nBTBase = nBTTagCompound.func_74781_a(arrayOfString[arrayOfString.length - 1]);
/* 60 */               if (nBTBase != null) {
/* 61 */                 if (nBTBase.func_74732_a() == 8) {
/* 62 */                   return ah.v(((NBTTagString)nBTBase).func_150285_a_());
/*    */                 }
/* 64 */                 return ah.v(nBTBase.toString());
/*    */               } 
/*    */             } 
/*    */           } 
/*    */           
/* 69 */           return ah.q;
/*    */       } 
/*    */     
/*    */     } 
/* 73 */     return new xk(Double.valueOf(0.0D));
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public void v(String str, o o1) {}
/*    */ 
/*    */   
/*    */   public String z() {
/* 82 */     NBTTagCompound nBTTagCompound = new NBTTagCompound();
/* 83 */     this.g.func_77955_b(nBTTagCompound);
/* 84 */     return nBTTagCompound.toString();
/*    */   }
/*    */ 
/*    */   
/*    */   public ItemStack v() {
/* 89 */     return this.g;
/*    */   }
/*    */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\kd.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */